/*
 *  ValueRef.java
 *
 *  $Id: NotEndsAt.java 45 2012-06-12 23:06:24Z johann.petrak@gmail.com $
 */

package at.ofai.gate.japeutils.ops;

import at.ofai.gate.japeutils.JapeUtils;
import gate.Annotation;
import gate.AnnotationSet;
import gate.jape.JapeException;
import gate.jape.constraint.*;
import gate.util.MethodNotImplementedException;
import java.util.Collection;


/**
 *
 * @author Johann Petrak
 */
public class NotEndsAt extends EndsAt {

  @Override
  public boolean doMatch(Object annotValue, AnnotationSet context)
    throws JapeException {

    Annotation annot = (Annotation) annotValue;
    AnnotationSet containedSet = doMatch(annot, context);

    Collection<Annotation> filteredSet = filterMatches(containedSet);

    return filteredSet.isEmpty();
  }

  public String getOperator() {
    return "notEndsAt";
  }
}
